package com.yonyou.cn.mongodbtest;

import java.io.*;
import java.nio.charset.Charset;

/**
 * @ClassName Test11
 * @Description TODO
 * @Author zhengchenggong
 * @Date 2020/4/17 7:19 下午
 * @Version 1.0
 **/
public class Test11 {
    public static void main(String[] args) {
//        System.out.println(System.getProperty("user.dir"));
//        String path = Test11.class.getResource("/log4j.properties").getPath();
        try {
//            FileInputStream fileInputStream = new FileInputStream(path.replace("!",""));
//            InputStreamReader isr = new InputStreamReader(fileInputStream, Charset.forName("utf-8"));
            BufferedReader br = new BufferedReader(new InputStreamReader(Test11.class.getClassLoader().getResourceAsStream("log4j.properties"),Charset.forName("utf-8")));
//            BufferedReader br = new BufferedReader(isr);
            String ss = null;
            while((ss = br.readLine())!=null){
                System.out.println(ss);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
        }
//        System.out.println(path);
    }
}
